Learning Objectives

After completing this lesson, you’ll be able to:

Video

Email Actions

FME has the capability to send email notifications to an external client, and this can either be done using the Emailer transformer in FME Workbench, or using the Email Action in Automations on FME Flow. This lesson aims to provide an overview of why you may choose to use one method over the other depending on your use case.

Email Actions are designed to have FME Flow send an email in response to a Trigger or Internal Action. The built-in email server in FME Flow is only for incoming mail, as is the IMAP protocol, so messages need to be sent via an existing (external) SMTP email server.

Setting up an Email Action

Creating an Email Action is done on the Automations page of the web interface and must connect to an existing Trigger. You can either create a new Automation and first set up a Trigger, or view existing Automations through the Manage Automations page, where you can then extend these workflows to include an email notification.

There are many more parameters for outgoing mail because the full SMTP server connection parameters need to be defined. However, there is an option to load a template for some of the most common email services.

Configuring Email Details

Various fields for the email itself (From, To, Subject, Template) can be hard-coded or passed through to the Action from the previous connection in the Automation, whether that be a Trigger or Internal Action. One important parameter is the Email Format, which can either be plain text, HTML, or rich text.

See the following sections for information on how to generate content for outgoing emails.

Setting up an Emailer

Configuring an Emailer transformer is similar to configuring an Email Action.

Note

See the Emailer documentation for full details.

Configuring the Emailer

Emailer vs. Email Action Parameters

Who, What, When, Where, Why?

At first glance, the functionality across the two techniques appears similar, as visually they have almost identical parameters. However, when considering which option is most suitable for your project there are a number of questions you can start to ask which may help determine the method to use.

Advantages of the Emailer

Include attribute values in the email body

Using the Emailer transformer means you can pass attribute values into the email body, for example, you could use the HTMLReportGenerator and include the html_content attribute to display a prettified report in the email body as opposed to an attachment. 

Send email during translation

The Emailer will send an email as soon as a feature reaches the transformer, whereas the Email in Automations will only be triggered once the workspace translation has been completed. This provides additional control over which scenarios an email is actually sent out.

Send multiple attachments

The Email Action currently only allows for one attachment to be uploaded, so in order to send multiple attachments, you would have to send these to a zipped file in your workspace, by using the Emailer transformer instead these can remain individual uploads.

Create presets for SMTP settings

If you require a large number of workspaces to send emails, transformers allow you to save parameter settings as Presets, this means that you only need to configure your Email SMTP settings once, and going forward can reference this preset.

Keep all components contained in a single workspace

Depending on your personal preference, you may prefer to use the Emailer so that everything relating to that workspace is kept together in a single workflow.

Workspace can be run on Form

If this workspace will continue to be run manually and through FME Flow, then you may choose to use the Emailer to get the same result on each platform.

Advantages of Email Action

Include Job information

By sending the email after the job has finished, you can access additional parameters such as the job, ID, status message, time submitted/finished, and the job log.

Free up engine

Using the Email Action allows the workspace to finish and frees up the engine it was using ready to start processing the next queued job.

Send Email from a trigger with no workspace

Using Automations, you can send emails directly in response to a trigger without the need to even run a workspace, this may be particularly useful for FME Flow Administrators who would like to monitor events that take place on the system.

Easier to maintain

Once a workspace has been published to FME Flow, the parameters can no longer be edited, therefore if there were any changes to the email parameters, for example, the sender credentials, you would have to download, modify, and republish the workspace. By using the Email action, you can manage the configuration through the Web UI.

Creates separation in a workflow

By setting up the Email Action, you are not confining the email to a single workflow. You may find this preferable as you can easily identify how things are linked together through the Web UI, it also means you can configure multiple workspaces to use the same email action. 

Quick Comparison Chart

What?

Emailer

Email Action

Include attribute values in email

Y

Send email during translation

Y

Send multiple attachments

Y

N - workaround is to zip files

Send job information

N

Y

Email configuration presets

Y

N - community idea

Keep all actions contained in a single workflow

N

Y

Send email without running a workspace

N

Y

Email configuration manageable through Web UI

N

Y